{layout name="layout/index" /}
<!--#1.模板列表-->
<!--##    目标网址、页面列表、页面数量、打包下载、删除、演示地址-->
<!--#2.新建任务-->
<!--##    目标网址、路径列表、资源列表、打包下载、cookie、header-->

    <div class="col-6">
        <div>
            <input type="radio" class="btn-check" name="options-outlined" id="success-outlined" autocomplete="off">
            <label class="btn btn-outline-success" for="success-outlined"  onclick="checkAll()">全选</label>
            <input type="radio" class="btn-check" name="options-outlined" id="danger-outlined" autocomplete="off" checked>
            <label class="btn btn-outline-danger" for="danger-outlined" onclick="uncheckAll()">取消</label>
            <button type="button" class="btn btn-outline-primary" onclick="toCopy()">开始COPY！</button>
        </div>
        <div id="url-list" class="col-12" style="height: 90vh; overflow-y: scroll;overflow-x:hidden">

        </div>
    </div>
    <div class="col-6">
        <div class="alert alert-warning" role="alert">
            共 <span class="alert-link" id="page-total">0</span> 个页面，复制到第 <span class="alert-link" id="page-no">0</span> 个。
            当前页面共 <span class="alert-link" id="file-total">0</span> 个文件，已下载 <span class="alert-link" id="file-no">0</span> 个。
            整体进度  <span class="alert-link" id="page-percent">0</span>。 当前页面进度  <span class="alert-link" id="file-percent">0</span>。
        </div>
    </div>

<script>
    $("#target-url").keydown(function (key) {
        if(key.keyCode == 13){
            baseUrl = $(this).val()
            $.ajax({
                type:"post",
                url:"./index.php/collect/index/index",
                data:{"link":$(this).val()},
                success:function(res){
                    result = JSON.parse(res)
                    if(result.code == 0){

                        let tpl = ''
                        let list = unique(result.data)
                        let oRegUrl = new RegExp();
                        oRegUrl.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");
                        for(i in list){

                            if (oRegUrl.test(list[i])) {

                                tpl += `
    <div class="form-check">
        <input class="form-check-input" type="checkbox" value="${list[i]}" id="check-${list[i]}" name="urls[]">
        <label class="form-check-label" for="check-${list[i]}">
            ${list[i]} <a href="${list[i]}" target="_blank" class="btn btn-outline-primary btn-sm">点击查看</a>
    </label>
    </div>`
                            }else if(list[i]){

                                if(list[i].substr(0,1) == '#'){
                                    continue
                                }

                                if(list[i].substr(0,1) == '/'){
                                    tpl += `
    <div class="form-check">
        <input class="form-check-input" type="checkbox" value="${baseUrl}${list[i]}" id="check-${list[i]}" name="urls[]">
        <label class="form-check-label" for="check-${list[i]}">
            ${baseUrl}${list[i]} <a href="${baseUrl}${list[i]}" target="_blank" class="btn btn-outline-primary btn-sm">点击查看</a>
    </label>
    </div>`
                                }else{
                                    tpl += `
    <div class="form-check">
        <input class="form-check-input" type="checkbox" value="${baseUrl}/${list[i]}" id="check-${list[i]}" name="urls[]">
        <label class="form-check-label" for="check-${list[i]}">
            ${baseUrl}/${list[i]} <a href="${baseUrl}/${list[i]}" target="_blank" class="btn btn-outline-primary btn-sm">点击查看</a>
    </label>
    </div>`
                                }
                            }
                        }
                        $("#url-list").append(tpl)

                    }
                }
            })
        }
    })
    function unique (arr) {
        return Array.from(new Set(arr))
    }
    // (function () {
    //     result = {"code":0,"msg":"\u83b7\u53d6\u6210\u529f","data":["#","javascript:void(0)","tel:00-62-658-658?demo=21","mailto:example@gmail.com?demo=21",null,null,null,null,null,null,null,"https:\/\/kuteshop.kutethemes.net\/my-account\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/","https:\/\/kuteshop.kutethemes.net\/cart\/","#","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/sport\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/smartphone-tablets\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/health-beauty\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/bags-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/toys-hobbies\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/networking-plus\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/laptops-plus\/?demo=21","#","#","#","#","#","#","#","#","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/jewelry\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/lights-lamps\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/cameras-photo\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/furniture\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/food-drink\/?demo=21","javascript:void(0);","https:\/\/kuteshop.kutethemes.net\/","https:\/\/kuteshop.kutethemes.net\/","https:\/\/kuteshop.kutethemes.net\/home-02\/","https:\/\/kuteshop.kutethemes.net\/home-03\/","https:\/\/kuteshop.kutethemes.net\/home-04\/","https:\/\/kuteshop.kutethemes.net\/home-05\/","https:\/\/kuteshop.kutethemes.net\/shop\/?demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?shop_page_layout=grid&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?shop_page_layout=list&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover=change&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover=zoom&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover=slide&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sidebar_shop_layout=left&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sidebar_shop_layout=right&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sidebar_shop_layout=full&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sticky_sidebar=1&product_per_page=40&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?woocommerce_pagination=load_more&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?woocommerce_pagination=pagination&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?woocommerce_pagination=infinite&demo=21","https:\/\/kuteshop.kutethemes.net\/cart\/?demo=21","https:\/\/kuteshop.kutethemes.net\/checkout\/?demo=21","https:\/\/kuteshop.kutethemes.net\/wishlist\/?demo=21","https:\/\/kuteshop.kutethemes.net\/order-tracking\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=standard&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=grid&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=slide&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=sticky&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_tabs=show-all&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?sidebar_product_layout=left&woo_related_desktop=4&woo_related_laptop=3&woo_related_ipad=3&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/short-sleeve-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/sleeveless-checkered-dress-2\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/daily-womens-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_list_style=standard&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_list_style=grid&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_list_style=list&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sidebar_blog_layout=left&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sidebar_blog_layout=right&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sidebar_blog_layout=full&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sticky_sidebar=1&blog_list_style=standard&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_pagination=pagination&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_pagination=load_more&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_pagination=infinite&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/electroluxs-award-winning-kettlet-and-dryer-pair\/?demo=21",null,"https:\/\/kuteshop.kutethemes.net\/my-account\/?demo=21","\/404-error?demo=21","https:\/\/1.envato.market\/WEdOn?demo=21","javascript:void(0)","https:\/\/kuteshop.kutethemes.net\/shop\/?demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?demo=21","#tab-09e710a-61339318d1d01","#tab-989c50d-61339318d1d4c","#tab-8fef63a-61339318d1d75","https:\/\/kuteshop.kutethemes.net\/product\/daily-womens-dress\/?demo=21","?add_to_wishlist=2213","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2213","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2213","https:\/\/kuteshop.kutethemes.net\/product\/daily-womens-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/short-sleeve-dress\/?demo=21","?add_to_wishlist=2215","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2215","#","https:\/\/kuteshop.kutethemes.net\/product\/short-sleeve-dress\/","https:\/\/kuteshop.kutethemes.net\/product\/short-sleeve-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/sleeveless-checkered-dress-2\/?demo=21","?add_to_wishlist=2218","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2218","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2218","https:\/\/kuteshop.kutethemes.net\/product\/sleeveless-checkered-dress-2\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/dresses-flowers-pattern\/?demo=21","?add_to_wishlist=2220","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2220","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2220","https:\/\/kuteshop.kutethemes.net\/product\/dresses-flowers-pattern\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?demo=21","?add_to_wishlist=2222","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2222","#","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphon-pro-max-128gb\/?demo=21","?add_to_wishlist=2207","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2207","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2207","https:\/\/kuteshop.kutethemes.net\/product\/iphon-pro-max-128gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","?add_to_wishlist=2291","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2291","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2291","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mobile-double-flash\/?demo=21","?add_to_wishlist=2619","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2619","#","https:\/\/kuteshop.kutethemes.net\/product\/mobile-double-flash\/","https:\/\/kuteshop.kutethemes.net\/product\/mobile-double-flash\/?demo=21","#tab-2b78a2c-61339318f0402","#tab-72f4c76-61339318f043f","#tab-769780d-61339318f0468","#tab-6e7cae6-61339318f0489","#tab-4b0b66a-61339318f04ab","javascript:void(0)","javascript:void(0)","#","#","https:\/\/kuteshop.kutethemes.net\/product\/black-autum-dresses\/?demo=21","?add_to_wishlist=2225","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2225","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2225","https:\/\/kuteshop.kutethemes.net\/product\/black-autum-dresses\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/classic-solid-sweater\/?demo=21","?add_to_wishlist=2227","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2227","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2227","https:\/\/kuteshop.kutethemes.net\/product\/classic-solid-sweater\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/set-t-shirt-and-short-pants\/?demo=21","?add_to_wishlist=2229","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2229","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2229","https:\/\/kuteshop.kutethemes.net\/product\/set-t-shirt-and-short-pants\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mens-soft-cotton-cardigan\/?demo=21","?add_to_wishlist=2231","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2231","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2231","https:\/\/kuteshop.kutethemes.net\/product\/mens-soft-cotton-cardigan\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/dresses-summer-floral\/?demo=21","?add_to_wishlist=2233","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2233","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2233","https:\/\/kuteshop.kutethemes.net\/product\/dresses-summer-floral\/?demo=21","#tab-2b78a2c-6133931902c08","#tab-72f4c76-6133931902c46","#tab-769780d-6133931902c6d","#tab-6e7cae6-6133931902c8e","#tab-4b0b66a-6133931902cae","javascript:void(0)","javascript:void(0)","#","#","https:\/\/kuteshop.kutethemes.net\/product\/dynamic-ball-size-5\/?demo=21","?add_to_wishlist=2236","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2236","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2236","https:\/\/kuteshop.kutethemes.net\/product\/dynamic-ball-size-5\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mens-superior-sneaker\/?demo=21","?add_to_wishlist=2241","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2241","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2241","https:\/\/kuteshop.kutethemes.net\/product\/mens-superior-sneaker\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/badminton-rackets\/?demo=21","?add_to_wishlist=2243","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2243","#","https:\/\/kuteshop.kutethemes.net\/product\/badminton-rackets\/","https:\/\/kuteshop.kutethemes.net\/product\/badminton-rackets\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoessport\/?demo=21","?add_to_wishlist=2245","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2245","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2245","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoessport\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoes\/?demo=21","?add_to_wishlist=2267","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2267","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2267","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoes\/?demo=21","#tab-2b78a2c-613393190ceb0","#tab-72f4c76-613393190cef0","#tab-769780d-613393190cf15","#tab-6e7cae6-613393190cf36","#tab-4b0b66a-613393190cf55","javascript:void(0)","javascript:void(0)","#","#","https:\/\/kuteshop.kutethemes.net\/product\/white-front-load-washer\/?demo=21","?add_to_wishlist=2270","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2270","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2270","https:\/\/kuteshop.kutethemes.net\/product\/white-front-load-washer\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/sanyer-refrigerator-150l\/?demo=21","?add_to_wishlist=2275","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2275","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2275","https:\/\/kuteshop.kutethemes.net\/product\/sanyer-refrigerator-150l\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/smart-tivi-sany-8k-full-hd\/?demo=21","?add_to_wishlist=2277","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2277","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2277","https:\/\/kuteshop.kutethemes.net\/product\/smart-tivi-sany-8k-full-hd\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/rice-cooker-steamer\/?demo=21","?add_to_wishlist=2281","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2281","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2281","https:\/\/kuteshop.kutethemes.net\/product\/rice-cooker-steamer\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/sun-house-rice-cooker\/?demo=21","?add_to_wishlist=2283","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2283","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2283","https:\/\/kuteshop.kutethemes.net\/product\/sun-house-rice-cooker\/?demo=21","#tab-2b78a2c-6133931913d6f","#tab-72f4c76-6133931913db0","#tab-769780d-6133931913dd7","#tab-6e7cae6-6133931913df8","#tab-4b0b66a-6133931913e18","javascript:void(0)","javascript:void(0)","#","#","https:\/\/kuteshop.kutethemes.net\/product\/digital-camera-full-frame\/?demo=21","?add_to_wishlist=2285","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2285","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2285","https:\/\/kuteshop.kutethemes.net\/product\/digital-camera-full-frame\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","?add_to_wishlist=2291","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2291","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2291","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/camera-sonic-4k-full-hd\/?demo=21","?add_to_wishlist=2294","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2294","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2294","https:\/\/kuteshop.kutethemes.net\/product\/camera-sonic-4k-full-hd\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/tablet-air-10-5inch-5g\/?demo=21","?add_to_wishlist=2296","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2296","#","https:\/\/kuteshop.kutethemes.net\/product\/tablet-air-10-5inch-5g\/","https:\/\/kuteshop.kutethemes.net\/product\/tablet-air-10-5inch-5g\/?demo=21","#tab-2b78a2c-6133931919e3f","#tab-72f4c76-6133931919e7a","#tab-769780d-6133931919e9f","#tab-6e7cae6-6133931919ec0","#tab-4b0b66a-6133931919ee2","javascript:void(0)","javascript:void(0)","#","#","https:\/\/kuteshop.kutethemes.net\/product\/wooden-tv-frame-65-inch\/?demo=21","?add_to_wishlist=2300","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2300","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2300","https:\/\/kuteshop.kutethemes.net\/product\/wooden-tv-frame-65-inch\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/felt-padded-armchair\/?demo=21","?add_to_wishlist=2307","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2307","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2307","https:\/\/kuteshop.kutethemes.net\/product\/felt-padded-armchair\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/bedroom-decoration-lights\/?demo=21","?add_to_wishlist=2309","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2309","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2309","https:\/\/kuteshop.kutethemes.net\/product\/bedroom-decoration-lights\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/lincoln-leadership-chair\/?demo=21","?add_to_wishlist=2317","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2317","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2317","https:\/\/kuteshop.kutethemes.net\/product\/lincoln-leadership-chair\/?demo=21","#tab-2b78a2c-613393191f7fc","#tab-72f4c76-613393191f837","#tab-769780d-613393191f85c","#tab-6e7cae6-613393191f87e","#tab-4b0b66a-613393191f89d","javascript:void(0)","javascript:void(0)","#","#","https:\/\/kuteshop.kutethemes.net\/product\/circle-pendant-necklace\/?demo=21","?add_to_wishlist=2319","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2319","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2319","https:\/\/kuteshop.kutethemes.net\/product\/circle-pendant-necklace\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/ring-platinum-plated\/?demo=21","?add_to_wishlist=2325","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2325","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2325","https:\/\/kuteshop.kutethemes.net\/product\/ring-platinum-plated\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/platinum-doka-earrings\/?demo=21","?add_to_wishlist=2330","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2330","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2330","https:\/\/kuteshop.kutethemes.net\/product\/platinum-doka-earrings\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/black-pearls-necklace\/?demo=21","?add_to_wishlist=2332","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2332","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2332","https:\/\/kuteshop.kutethemes.net\/product\/black-pearls-necklace\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/diamond-ring-eternity-bands\/?demo=21","?add_to_wishlist=2334","https:\/\/kuteshop.kutethemes.net?action=yith-woocompare-add-product&id=2334","#","https:\/\/kuteshop.kutethemes.net\/?add-to-cart=2334","https:\/\/kuteshop.kutethemes.net\/product\/diamond-ring-eternity-bands\/?demo=21","#","#","#tab-d42ab97-6133931928f8f","#tab-572d757-61339319292ca","#tab-6be3ed6-613393192950c","#tab-68ec606-6133931929732","#tab-ff69ac5-6133931929955","#tab-9f2b470-6133931929ba6","#tab-cb0b192-6133931929da0","#tab-9ae4fc6-6133931929f69","#tab-33463de-613393192a16f","https:\/\/kuteshop.kutethemes.net\/product-brand\/hermes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-brand\/hermes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/movado-bolblack-watch\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/movado-bolblack-watch\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/yeezy-season-undestroyed\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/yeezy-season-undestroyed\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/ted-baker-handbags-2\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/ted-baker-handbags-2\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/batteries\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/headphone-headset\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/home-audio\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/lights-lamps\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/jewelry\/men-watches\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/jewelry\/wedding-rings\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/jewelry\/earring\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/jewelry\/necklaces\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/sport\/golf-supplies\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/sport\/sport-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/sport\/camping-hiking\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/sport\/fishing\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/smartphone-tablets\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/cameras-photo\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/laptops-plus\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/networking-plus\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/for-men\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/for-women\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/kids-fashion\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/bags-shoes\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/furniture\/wood-decor\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/furniture\/sofa\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/furniture\/glasses\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/furniture\/indoor-furniture\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/health-beauty\/bath-body\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/health-beauty\/beauty-spa\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/health-beauty\/fragrances\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/health-beauty\/shaving-hair\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/product-category\/toys-hobbies\/fpv-system-parts\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/toys-hobbies\/helicopters\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/toys-hobbies\/rc-cars-parts\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/toys-hobbies\/walkera\/?demo=21","#","tel:+00%20123%20456%20789","mailto:support@business.com","https:\/\/kuteshop.kutethemes.net\/about-us\/?demo=21","#","#","https:\/\/kuteshop.kutethemes.net\/terms-conditions\/?demo=21","https:\/\/kuteshop.kutethemes.net\/contact-us\/?demo=21","https:\/\/kuteshop.kutethemes.net\/my-account\/orders\/?demo=21","https:\/\/kuteshop.kutethemes.net\/wishlist\/?demo=21","#","#","#","#","#","https:\/\/kuteshop.kutethemes.net\/privacy-policy\/?demo=21","#","#",null,null,null,null,null,"https:\/\/kuteshop.kutethemes.net\/product\/ipad-mini-4-7-9-wi-fi\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/tablet-air-10-5inch-5g\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mobile-double-flash\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/message-basket-bag\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/clear-tote-bags\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/custom-cute-dresses\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/antex-twelve-steel-bags\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/smart-tivi-sany-8k-full-hd\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/smart-tivi-sany-8k-full-hd\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/smart-tivi-sany-8k-full-hd\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/smart-tivi-sany-8k-full-hd\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/flat-samsang-tv\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/apla-mobile-5s-4g\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/tablet-air-10-5inch-5g\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphon-pro-max-128gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/ipad-mini-4g-wifi\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/iphone-10-rsx-max-256gb\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mens-superior-sneaker\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoessport\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoessport\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/comfortable-shoessport\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mens-superior-sneaker\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/mens-superior-sneaker\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/women-fashion-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/women-fashion-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/crocodile-shoes\/?demo=21","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","https:\/\/kutethemes.com\/","https:\/\/kuteshop.kutethemes.net\/my-account\/","https:\/\/kuteshop.kutethemes.net\/my-account\/","https:\/\/kuteshop.kutethemes.net\/my-account\/","#","#ovic-menu-panel-121","https:\/\/kuteshop.kutethemes.net\/","#ovic-menu-panel-191","https:\/\/kuteshop.kutethemes.net\/shop\/?demo=21","#ovic-menu-panel-192","https:\/\/kuteshop.kutethemes.net\/blog\/?demo=21","#ovic-menu-panel-193","","https:\/\/1.envato.market\/WEdOn?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/sport\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/smartphone-tablets\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/health-beauty\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/bags-shoes\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/toys-hobbies\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/networking-plus\/?demo=21","#ovic-menu-panel-437","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/laptops-plus\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/jewelry\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/electronic\/lights-lamps\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/cameras-photo\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/digital\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/furniture\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/fashion\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product-category\/food-drink\/?demo=21","https:\/\/kuteshop.kutethemes.net\/","https:\/\/kuteshop.kutethemes.net\/home-02\/","https:\/\/kuteshop.kutethemes.net\/home-03\/","https:\/\/kuteshop.kutethemes.net\/home-04\/","https:\/\/kuteshop.kutethemes.net\/home-05\/","https:\/\/kuteshop.kutethemes.net\/shop\/?shop_page_layout=grid&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?shop_page_layout=list&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover=change&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover=zoom&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover=slide&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?product_hover&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sidebar_shop_layout=left&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sidebar_shop_layout=right&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sidebar_shop_layout=full&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?sticky_sidebar=1&product_per_page=40&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?woocommerce_pagination=load_more&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?woocommerce_pagination=pagination&demo=21","https:\/\/kuteshop.kutethemes.net\/shop\/?woocommerce_pagination=infinite&demo=21","https:\/\/kuteshop.kutethemes.net\/cart\/?demo=21","https:\/\/kuteshop.kutethemes.net\/checkout\/?demo=21","https:\/\/kuteshop.kutethemes.net\/wishlist\/?demo=21","https:\/\/kuteshop.kutethemes.net\/order-tracking\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=standard&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=grid&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=slide&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_thumbnail=sticky&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?single_product_tabs=show-all&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?sidebar_product_layout=left&woo_related_desktop=4&woo_related_laptop=3&woo_related_ipad=3&demo=21","https:\/\/kuteshop.kutethemes.net\/product\/womens-cocktail-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/short-sleeve-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/sleeveless-checkered-dress-2\/?demo=21","https:\/\/kuteshop.kutethemes.net\/product\/daily-womens-dress\/?demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_list_style=standard&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_list_style=grid&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_list_style=list&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sidebar_blog_layout=left&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sidebar_blog_layout=right&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sidebar_blog_layout=full&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?sticky_sidebar=1&blog_list_style=standard&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_pagination=pagination&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_pagination=load_more&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/?blog_pagination=infinite&demo=21","https:\/\/kuteshop.kutethemes.net\/blog\/electroluxs-award-winning-kettlet-and-dryer-pair\/?demo=21","https:\/\/kuteshop.kutethemes.net\/my-account\/?demo=21","\/404-error?demo=21","#ovic-menu-panel-452","#","#ovic-menu-panel-453","#","#","#","#","#","#","#","#","#","#"]}
    //
    //     let tpl = ''
    //     let list = unique(result.data)
    //     let oRegUrl = new RegExp();
    //     oRegUrl.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");
    //     for(i in list){
    //         if (oRegUrl.test(list[i])) {
    //
    //                 tpl += `
    //     <div class="form-check">
    //         <input class="form-check-input" type="checkbox" value="${list[i]}" id="check-${i}" name="urls[]">
    //         <label class="form-check-label" for="check-${i}">
    //             ${list[i]} <a href="${list[i]}" target="_blank" class="btn btn-outline-primary btn-sm">点击查看</a>
    //         </label>
    //     </div>`
    //             }
    //         }
    //         $("#url-list").append(tpl)
    // })();
    function checkAll() {
        $("#url-list input:checkbox").each(function () {
            $(this).prop("checked",1)
        })
    }
    function uncheckAll() {
        $("#url-list input:checkbox").each(function () {
            this.checked = false
        })
    }
    function toCopy() {
        let checkUrls = $("#url-list input[type=checkbox]:checked")
        let urls = []
        $("#page-total").text(checkUrls.length)
        for(i=0;i<checkUrls.length;i++){
            $("#page-no").text(i+1)
            let percent = ((i+1)/checkUrls.length)+"%"
            $("#page-percent").text(percent)
            copyPage(checkUrls[i].value)
            // return false
        }
    }
    function copyPage(url) {
        $.ajax({
            type: 'post',
            url: './index.php/collect/copy',
            data: {"link":url},
            success:function (res) {
                result = JSON.parse(res)
                if(result.code == 0) {
                    let file = ''
                    let list = unique(result.data)
                    $("#file-total").text(list.length)
                    let oRegUrl = new RegExp();
                    oRegUrl.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");
                    for(i in list){
                        file = ''
                        if (oRegUrl.test(list[i])) {
                            file = list[i]

                        }else if(list[i]){
                            if(list[i].substr(0,1) == '#'){
                                continue
                            }
                            if(list[i].substr(0,1) != '/'){
                                file = baseUrl+'/'+list[i]
                            }else{
                                file = baseUrl+list[i]
                            }
                        }
                        if(file.length > 0){
                            $("#file-no").text(list.length)
                            let percent = ((i+1)/list.length)+"%"
                            $("#page-percent").text(percent)
                            downFile(file)
                            // break
                        }
                    }
                    $("#page-percent").text("100%")
                }
            }
        })
    }
    function downFile(file) {
        $.ajax({
            type: 'post',
            url: './index.php/collect/down',
            data: {"link": file,"project":$("#target-url").val()},
            success: function (res) {
                console.log(res)
                result = JSON.parse(res)
                if (result.code == 0) {

                }
                $("#page-percent").text("100%")
            }
        })

    }
</script>